﻿using System;

namespace Outfish {

	/// <summary>
	/// Represents a web page constructed of HTML.
	/// </summary>
	public class HtmlPage : WebPage {
	
		#region constructor
	
		/// <summary>
		/// Constructs an empty webpage which needs its content loaded via .LoadContent(source)
		/// </summary>
		/// <remarks>
		/// Derived classes should use this constructor then explicitly call .LoadContent(source)
		/// </remarks>
		public HtmlPage(){}

		/// <summary>
		/// Constructs a generic HtmlPage from the htmlSource.  
		/// </summary>
		/// <remarks>
		/// Derived classes SHOULD NOT use this as the call to .LoadContent(source) will bypass the derived classes code.
		/// </remarks>
		/// <param name="htmlSource">HTML returned from web</param>
		public HtmlPage(string htmlSource):base(htmlSource){}
	
		#endregion

		override protected WebDocument BuildDocument(){
			return new HtmlDocument( this.Source );
		}

	}
	
}
